mysql> create database JPress character set utf8mb4 collate utf8mb4_bin;      

mysql> grant all privileges on JPress.* to 'JPress_mysql'@'%' identified by 'JPress_mysql7_passw0rd';
#检查授权
mysql> SHOW GRANTS FOR 'JPress@_mysql'@'%';

JPress_mysql
JPress_mysql7_passw0rd

#JPress的管理账号
JPress-ljianing
Passw0rd=


root@hw-01:~# kubectl get pvc -n blogs
NAME                    STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
tomcat-jpress-pvc-nfs   Bound    pvc-6d0ae42a-ab43-4207-847c-38d572692e75   1Gi        RWX            nfs-csi-sc     69m

root@hw-01:~# scp soft-package/jpress-v5.0.9.war /nfs-vol/pvc-6d0ae42a-ab43-4207-847c-38d572692e75


root@hw-01:~# ls /nfs-vol/pvc-6d0ae42a-ab43-4207-847c-38d572692e75
jpress-v5.0.9  jpress-v5.0.9.war

#创建ROOT软连接到目标war包
root@hw-01:/nfs-vol/pvc-6d0ae42a-ab43-4207-847c-38d572692e75# ln -s jpress-v5.0.9 ROOT
root@hw-01:/nfs-vol/pvc-6d0ae42a-ab43-4207-847c-38d572692e75# ll
total 119036
drwxr-xr-x 3 root root      4096 Nov 28 10:46 ./
drwxr-xr-x 8 root root      4096 Nov 27 20:50 ../
drwxr-x--- 6 root root      4096 Nov 28 10:44 jpress-v5.0.9/
-rw-r--r-- 1 root root 121879530 Nov 27 22:01 jpress-v5.0.9.war
lrwxrwxrwx 1 root root        13 Nov 28 10:46 ROOT -> jpress-v5.0.9/




待脚本初始化
